'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {

    try {
      const getList = await this.ctx.service.getType.getList();
      this.ctx.body = {
        data: getList
      };
      this.ctx.status = 200;
    } catch (err) {
      this.ctx.body = {
        code: 404,
        data: "缺少参数"
      };
      this.ctx.status = 404;
    }

    // this.ctx.body = house_type;

  }
}

module.exports = HomeController;
